package fr.mma.livraison.comparator;

import java.util.Comparator;

import fr.mma.livraison.model.dto.ApplicationDTO;

public class ApplicationComparator implements Comparator<ApplicationDTO> {

	@Override
	public int compare(final ApplicationDTO application0, final ApplicationDTO application1) {
		if (application0.getPriorite() < application1.getPriorite()) {
			return -1;
		}
		if (application0.getPriorite() > application1.getPriorite()) {
			return 1;
		}
		return 0;
	}

}
